import {
	http
} from '../utils/request'

/**
 * 获取用户是否已认证
 * @param {Object} params 
 * @returns 
 */
export function isUserCertification(params) {
	return http.get({
		url: '/index.php/Wxapp/Bussniss/getUserCertification',
		data: params
	})
}

/**
 * 获取用户信息
 * @param {Object} params 
 * @returns 
 */
export function getUserInfo(params) {
	return http.get({
		url: '/index.php/Wxapp/User/getUserInfo',
		data: params
	})
}

/**
 * 提交用户信息
 * @param {Object} params 
 * @returns 
 */
export function submitUser(params) {
	return http.form({
		url: '/index.php/Wxapp/User/releaseUser',
		data: params
	})
}
/**
 * 获取近期动账
 * @param {Object} params 
 * @returns 
 */
export function getMsgTips(params) {
	return http.get({
		url: '/index.php/Wxapp/Msgtip/getList',
		data: params
	})
}

/**
 * 积分兑换
 * @param {Object} params { token, productId, number }
 * @returns 
 */
export function buyProduct(params) {
	return http.form({
		url: '/index.php/Wxapp/Product/BuyProduct',
		data: params
	})
}
/**
 * 商品详情
 * @param {Object} params { token, productId }
 * @returns 
 */
export function getProduct(params) {
	return http.get({
		url: '/index.php/Wxapp/Product/detail',
		data: params
	})
}
/**
 * 关于我们
 * @returns 
 */
export function getAbout() {
	return http.get({
		url: '/index.php/Wxapp/Linkus/Linkus'
	})
}
